From f54e0a283b614aa6b512b0577a0373f380b3f92a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 19 Dec 2015 00:33:20 -0500 Subject: [PATCH] label: Allocate gadget before using it Move the gtk_css_gadget_allocate call before the gtk_label_update_layout_width call. This fixes the statusbar label in widget-factory page 2 coming up fully ellipsized. --- gtk/gtklabel.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 3f41d25c8b..f7e1445bba 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -4084,6 +4084,11 @@ gtk_label_size_allocate (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_label_parent_class)->size_allocate (widget, allocation); + gtk_css_gadget_allocate (priv->gadget, + allocation, + gtk_widget_get_allocated_baseline (widget), + &clip); + if (priv->layout) gtk_label_update_layout_width (label); @@ -4094,11 +4099,6 @@ gtk_label_size_allocate (GtkWidget *widget, allocation->width, allocation->height); - gtk_css_gadget_allocate (priv->gadget, - allocation, - gtk_widget_get_allocated_baseline (widget), - &clip); - gtk_label_get_ink_rect (label, &clip_rect); gdk_rectangle_union (&clip_rect, &clip, &clip_rect); _gtk_widget_set_simple_clip (widget, &clip_rect); -- 2.30.2